package com.tencent.wxcloudrun.pojo.bo;

/**
 * 合同生成任务状态枚举
 */
public enum ContractTaskStatusEnum {

    /**
     * 等待生成
     */
    PENDING("PENDING", "等待生成"),

    /**
     * 生成中
     */
    GENERATING("GENERATING", "生成中"),

    /**
     * 生成完成
     */
    COMPLETED("COMPLETED", "生成完成"),

    /**
     * 生成失败
     */
    FAILED("FAILED", "生成失败");

    private final String value;
    private final String description;

    ContractTaskStatusEnum(String value, String description) {
        this.value = value;
        this.description = description;
    }

    public static ContractTaskStatusEnum fromValue(String value) {
        for (ContractTaskStatusEnum status : ContractTaskStatusEnum.values()) {
            if (status.getValue().equals(value)) {
                return status;
            }
        }
        throw new IllegalArgumentException("Unknown contract task status: " + value);
    }

    public String getValue() {
        return value;
    }

    public String getDescription() {
        return description;
    }
}
